<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>美信三伏灸订单管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/mx/mxSfj/export");
						$("#searchForm").submit();
						$("#searchForm").attr("action","${ctx}/mx/mxSfj/");
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
			$("#btnExportV2").click(function(){
				top.$.jBox.confirm("确认要导出数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/mx/mxSfj/exportV2");
						$("#searchForm").submit();
						$("#searchForm").attr("action","${ctx}/mx/mxSfj/");
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/mx/mxSfj/">美信三伏灸订单列表</a></li>
		<shiro:hasPermission name="mx:mxSfj:edit"><li><a href="${ctx}/mx/mxSfj/form">美信三伏灸订单添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="mxSfj" action="${ctx}/mx/mxSfj/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>姓名：</label>
				<form:input path="userName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>联系方式：</label>
				<form:input path="mobile" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label style="width: 100px">查询开始时间：</label>
				<input name="queryDateUp" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					   value="<fmt:formatDate value="${mxSfj.queryDateUp}" pattern="yyyy-MM-dd HH:mm"/>"
					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
			</li>
			<li><label style="width: 100px">查询结束时间：</label>
				<input name="queryDateDown" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					   value="<fmt:formatDate value="${mxSfj.queryDateDown}" pattern="yyyy-MM-dd HH:mm"/>"
					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
			</li>
			<li><label>用户类型：</label>
				<form:select path="userType" class="input-small">
					<form:option value="" label="全部"/>
					<form:option value="1" label="三伏贴"/>
					<form:option value="2" label="古法艾灸"/>
					<form:option value="3" label="AI测肤"/>
				</form:select>
			</li>
			<li><label>预约地点：</label>
				<form:select path="tenantId" class="input-small">
					<form:option value="" label="全部"/>
					<form:option value="1" label="福州瑞莱春堂三坊七巷馆"/>
					<form:option value="2" label="福州瑞莱春堂仓山馆"/>
					<form:option value="3" label="福州瑞莱春堂华林巷馆"/>
					<form:option value="4" label="福州瑞莱春堂澳门路馆"/>
					<form:option value="5" label="泉州瑞莱春堂丰泽馆"/>
					<form:option value="6" label="三明瑞莱春堂列东馆"/>
					<form:option value="7" label="龙岩瑞莱春堂新罗馆"/>
					<form:option value="8" label="宁德树德堂中医馆"/>
					<form:option value="9" label="福州博方堂中医门诊部（台江店）"/>
					<form:option value="10" label="福州博方堂中医门诊部（鼓楼店）"/>
					<form:option value="11" label="南平本草堂中医诊所<"/>
					<form:option value="12" label="漳州市永欣堂中医馆"/>
					<form:option value="13" label="漳州市平和县永欣堂中医馆"/>
					<form:option value="14" label="莆田市善痛堂理疗服务中心"/>
				</form:select>
			</li>
			<li class="btns">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
				<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
				<input id="btnExportV2" class="btn btn-primary" type="button" value="加密导出"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>识别码</th>
				<th>姓名</th>
				<th>联系方式</th>
				<th>用户类型</th>
				<th>预约地点</th>
				<th>预约时间</th>
				<th>预约时间（初伏）</th>
				<th>预约时间（中伏）</th>
				<th>预约时间（末伏）</th>
				<th>创建时间</th>
				<th>已预约成功</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="mxSfj">
			<tr>
				<td>
						${mxSfj.id}
				</td>
				<td>
						${mxSfj.userName}
				</td>
				<td>
						${mxSfj.mobile}
				</td>
				<c:if test="${mxSfj.userType eq '1'}"><td>三伏贴</td></c:if>
				<c:if test="${mxSfj.userType eq '2'}"><td>古法艾灸</td></c:if>
				<c:if test="${mxSfj.userType eq '3'}"><td>AI测肤</td></c:if>
				<td>
					${mxSfj.tenantName}
				</td>
				<td>
						<fmt:formatDate value="${mxSfj.orderDate}" pattern="yyyy-MM-dd HH:mm"/>
				</td>
				<td>
						<fmt:formatDate value="${mxSfj.orderDateChu}" pattern="yyyy-MM-dd HH:mm"/>
				</td>
				<td>
						<fmt:formatDate value="${mxSfj.orderDateZhong}" pattern="yyyy-MM-dd HH:mm"/>
				</td>
				<td>
						<fmt:formatDate value="${mxSfj.orderDateMo}" pattern="yyyy-MM-dd HH:mm"/>
				</td>
				<td>
					<fmt:formatDate value="${mxSfj.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
						${fns:getDictLabel(mxSfj.status, 'yes_no', '')}
				</td>
<%--				<td>--%>
<%--					${mxSfj.remarks}--%>
<%--				</td>--%>
				<td>
					<c:if test="${mxSfj.status eq '1'}">
						<a href="${ctx}/mx/mxSfj/updateStatus?status=0&id=${mxSfj.id}">取消预约</a>
					</c:if>
					<c:if test="${mxSfj.status ne '1'}">
						<a href="${ctx}/mx/mxSfj/updateStatus?status=1&id=${mxSfj.id}">预约成功</a>
					</c:if>
<%--					<a href="${ctx}/mx/mxSfj/delete?id=${mxSfj.id}" onclick="return confirmx('确认要删除该美信三伏灸订单吗？', this.href)">删除</a>--%>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
